Skip to content

Fix duplicate entries of elements in a category when re-exported. #4043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2025

Conversation

jonasfj
Copy link
Member

@jonasfj jonasfj commented Apr 30, 2025

If a package has two libraries foo.dart and bar.dart where

  • foo.dart contains Foo with an /// {@category ...} annotation, and,
  • bar.dart re-exports foo.dart.

Then the category page shall not list Foo twice, which is simply a bug.

This change fixes this issue.


There is an example of the issue in production here:
https://pub.dev/documentation/typed_sql/latest/topics/Exceptions-topic.html

image

If a package has two libraries `foo.dart` and `bar.dart` where
 * `foo.dart` contains `Foo` with an `/// {@category ...}` annotation,
   and,
 * `bar.dart` re-exports `foo.dart`.

Then the category page shall not list `Foo` twice, which is simply a
bug.

This change fixes this issue.
@jonasfj jonasfj requested a review from szakarias April 30, 2025 10:55
Copy link
Member

@srawlins srawlins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

Copy link
Contributor

@szakarias szakarias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@szakarias szakarias merged commit e4f9451 into dart-lang:main May 5, 2025
9 checks passed
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request May 5, 2025
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/95105e9..e4f9451):
  e4f9451a  2025-05-05  Jonas Finnemann Jensen  Fix duplicate entries of elements in a category when re-exported. (dart-lang/dartdoc#4043)
  876180bd  2025-05-01  dependabot[bot]  Bump github/codeql-action from 3.28.13 to 3.28.16 in the github-actions group (dart-lang/dartdoc#4045)

http (https://github.com/dart-lang/http/compare/63c477b..78d6114):
  78d6114  2025-05-02  Brian Quinlan  Add a new exception type `NSErrorClientException` (dart-lang/http#1763)
  7a2e7d5  2025-05-01  Brian Quinlan  Add a useful stringificiation to `WebSocketConnectionClosed` (dart-lang/http#1764)
  ccb6533  2025-05-01  dependabot[bot]  Bump the github-actions group across 1 directory with 4 updates (dart-lang/http#1761)
  7568b5c  2025-05-02  Alex Li  [web_socket] Adds `WebSocketException.toString()` (dart-lang/http#1756)
  3e4cceb  2025-05-01  Brian Quinlan  Make response headers tests pass on firefox (dart-lang/http#1762)
  5704b0c  2025-05-01  Brian Quinlan  [cronet_http/cupertino_http]: Fixes bugs where cancelling `StreamedResponse.stream` did not sever the connection (dart-lang/http#1760)

test (https://github.com/dart-lang/test/compare/c3755d8..55d1f9e):
  55d1f9ed  2025-05-05  Fichtelcoder  Fix typos in json_reporter documentation (dart-lang/test#2493)

vector_math (https://github.com/google/vector_math.dart/compare/39cafd4..0279cb8):
  0279cb8  2025-05-01  Ömer Sinan Ağacan  Improve performance of functions with dynamic arguments (google/vector_math.dart#345)

Change-Id: I9a67b997ebcf7ebe29162f8f524628013d53af5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426581
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Devon Carew <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants